Content-based networks are described in A. Carzaniga, M. J. Rutherford, A. L. Wolf, A routing scheme for content-based networking, Department of Computer Science, University of Colorado, June 2003.
The field of “Implicit Routing” (or “content routing”) is an emerging networking technology. Implicit Routing is the act of forwarding customer data based on the content, rather than a networking header specifying an explicitly addressed destination.
FIG. 1 illustrates an exemplary content-routed network 1. The exemplary content-routed network 1 is composed of plurality of content-routers 2, 3, 4 and 5, a plurality of publishers 11, 12 and 13, and a plurality of subscribers 21, 22, 23, 24, 25, 26, 27 and 28.
A content router is a digital communications networking device which forwards content based on inspection of the contents of a message or document, rather than on an explicit destination address in the networking header of a packet or frame. An example of such a device is the 3200 Multiservice Message Router from Solace Systems, Inc. Content routers must have connections between themselves so that they can communicate with each other and exchange both information needed to control the network, as well as to carry the content received from publishers from one content router to the next, in order to deliver it to the subscribers in the network that are interested in the content. In FIG. 1, link 43 connects content routers 2 and 3; link 46 connects content routers 3 and 4; link 48 connects content routers 4 and 5; and link 49 connects content routers 2 and 5. Such a link could be accomplished using a variety of technologies, examples of which are:                A Transmission Control Protocol (TCP) connection across an IP network        An MPLS circuit across an MPLS network        A direct physical link, such as a serial line, Ethernet link, SONET link, etc.        A virtual circuit across an Asynchronous Transfer Mode (ATM) network        A virtual circuit across a Frame Relay network        A virtual layer 2 circuit across an Ethernet network        Wireless Local Area Network as per 802.11 (e.g. 802.11a, 802.11b, or 802.11g)        
A publisher is a computer, user or device that can insert content into the network. Another name commonly used in the literature is an event source or a producer. A publisher connects to a content router over a link, using a variety of techniques as explained above, and then the publisher can inject content into network 1. For example, link 41 connects publisher 11 to content router 2.
A subscriber is a computer, user or device that has expressed interest in some specific content. Another name commonly used in the literature is event displayers or consumers. A subscriber connects to a content router over a link, using a variety of techniques as explained above, and then the subscriber can receive content from the network 1. For example, link 42 connects subscriber 22 to content router 2.
FIG. 1 also illustrates an example of content from publisher 11 being injected into the content routed network 1. Publisher 11 sends a document 61A to content router 2. Such a document can be delivered using a variety of protocols, such as TCP, HTTP, SMTP, etc. Content router 2 receives the document, and matches the contents of the document against its forwarding table. The forwarding table is comprised of a series of expressions that indicates matching conditions against the contents of received documents. For example, for documents formatted as Extensible Markup Language (XML) (refer to Extensible Markup Language (XML) 1.0 (Third Edition)”, W3C Recommendation 4 Feb. 2004, W3C (World Wide Web Consortium)) a suitable subscription syntax is XML Path Language (XPath) (refer to reference “XML Path Language (XPath) Version 1.0”, W3C Recommendation 16 Nov. 1999, W3C (Word Wide Web Consortium)).
The manner in which a content router learns of subscriptions from other routers in the network, and routes an incoming document to the correct set of egress links, is outside the scope of the present invention. One such scheme is described in our co-pending application Ser. No. 11/012,113 entitled “Implicit Routing in Content Based Networks”, as well as to “A. Carzaniga, M. J. Rutherford, A. L. Wolf, A routing scheme for content-based networking, Department of Computer Science, University of Colorado, June 2003”, the contents of both which are herein incorporated by reference.
In FIG. 1, publisher 11 sends document 61A over link 41 to content router 2. Content router 2 compares the full content of the document against its internal content forwarding table, and computes that locally attached subscriber 22 requires a copy of the document, but local subscriber 21 does not. In addition, one or more subscribers that are preferentially reachable via link 43 require a copy of the document, while no subscribers that require a copy of the document are preferentially reachable over link 49. As a result, content router 2 sends a copy 61B of the document over link 42 towards subscriber 22, and sends a copy 61C of the document over link 43 towards content router 3. Content router 3 repeats the process, and sends a copy 61D of the document over link 44 to subscriber 23, a copy 61E over link 45 to subscriber 25, and a copy 61F over link 46 towards content router 4. Finally, content router 4 repeats the process and delivers a copy 61G of the document over link 47 to subscriber 26. Note that a single copy of the document is sent over a link between content routers, regardless of the number of subscribers downstream that require the document.
In the prior art, research has been undertaken into algorithms for efficiently matching large numbers of XPath Expressions (or similar) against XML documents for use in document filtering systems or publish/subscribe content routing systems. For example:                [XFilter] “Efficient filtering of XML documents for selective data dissemination”, M. Altinel and M. Franklin, Proceedings of VLDB, pages 53-64, September 2000.        [XTrie] “Efficient filtering of XML documents with XPath expressions”, Chee-Yong Chan, Pascal Felber, Minos Garofalakis, Rajeev Rasogi; Proceedings of the International Conference on Data Engineering, 2002.        [YFilter] “Path Sharing and Predicate Evaluation for High-Performance XML Filtering”, Yanlei Diao, Mehmet Altinel, Michael J. Franklin, Hao Zhang, Peter Fischer; ACM Transactions on Database Systems, 28(4):467-516, 2003.        [DFA_SIX] “Processing XML Streams with Deterministic Automata and Stream Indexes”, Todd J. Green, Ashish Gupta, Gerome Miklau, Makoto Onizuka, Dan Suciu, May 11, 2004.        
The algorithm in [XFilter] uses a finite state machine (FSM) per query approach, and thus does not scale to a very large number of subscriptions. For example, with just 50,000 subscriptions, the filtering time of a single document takes over 1 second. In addition, [XFILTER] only dealt with single-path structural matches of XPath expressions, and did not support predicates, including conditions on attribute values, and the content of text nodes. Structural-only matching is not suitable for content routed networks.
The algorithm in [XTRIE] supports more complex XPath expressions, and factors out common sub-strings of the subscriptions and indexes them using a trie data structure. [XTrie] focus on an algorithm for structural matches only (including path predicates), and does not satisfactorily describe algorithms suitable for text and attribute matching (value-based predicates) over a large subscription database.
[YFilter] utilizes a non-deterministic finite automaton (NFA) which allows for a relatively small number of machine states for large number of path expressions, the ability to support complicated document types, including nested recursion, and allows for incremental construction and maintenance. The main NFA supports structural matching, using a single run-time stack to track the current active set of states, and to allow back-tracking to the last active set of states when the end of an XML element is reached. [YFILTER] also proposes two approaches to extend the algorithm to support value-based predicates. The first is “Inline”, which applies tests for the value-based predicates during NFA processing, and the second is “Selection Postponed” (SP), which first runs the NFA for structural matching, and then applies selection predicates in a post-processing phase. The “Inline” approach extends the information stored in each state of the NFA via a table per state that stores information about each predicate to be tested. Such simple tables are not scalable, as a large number of queries could be testing predicates at the same state. Moreover, the book-keeping data structures proposed are inefficient and not scalable. With the second approach proposed, SP, predicate evaluation is delayed until the end, with the advantage that predicate evaluation is only carried out for subscriptions that have already matched structurally against the document. However, this approach requires temporarily storing data from elements, such as the text portion, which can be arbitrarily large. In addition, the algorithm in [YFilter] requires post-processing to handle nested predicates.
The algorithm of [DFA_SIX] uses a single Deterministic Finite Automaton (DFA) to represent a large number of XPath expressions to achieve a constant throughput, independent of the number of XPath expressions. The DFA is formed by first converting the XPath expressions into an NFA, and then converting the NFA into a single DFA. The NFA is constructed in a manner similar to [YFILTER]. [DFA_SIX] concludes that building an eager DFA, i.e. simply based on the XPath subscription database, in not scalable, due to an exponential explosion in the number of required states, and instead the DFA must be built lazily, i.e. on demand as documents are processed. The lazy construction means that only required states, based on the structure of input documents seen, is constructed, instead of all states that would be required to process any arbitrary document. The lazy construction results in the algorithm running much slower until it is “trained”, i.e. until the required DFA construction phase is complete. The [DFA_SIX] algorithm avoids a state explosion by training only on actual documents received, and depending upon the fact that the documents will follow a few DTDs which will limit the number of states actually needed. However, the algorithm could be simply attacked by sending a stream of arbitrarily structured XML documents that do not follow a few DTDs. This will cause a state explosion. Also, the [DFA_SIX] algorithm does not handle changes in the subscription database easily, since the DFA must be rebuilt, and the performance during the lazy building phase is low.
None of the prior art techniques discuss how the algorithms utilized can be efficiently adapted to a hardware implementation. Looking at the history of IP routers as an example, these devices started out as software running on general-purpose UNIX workstations, then evolved to specialized devices, but still performing the processing in software, then there was an evolution to hardware-based forwarding, using Field Programmable Gate Arrays (FPGA), Application Specific Integrated Circuits (ASIC), or specialized network processors. The XML content-matching prior art discussed above applies to software implementation running on general purpose workstations. For example, [DFA_SIX] reported throughput of 20 to 27 Mbits per second, using the lazy DFA approach, in the steady state once the construction phase was complete. In order to provide very high performance (e.g. Gigabit per second throughput or higher) and a very large subscription database, a specialized hardware implementation is needed. This also requires algorithms specifically optimized for a hardware implementation.
A recently announced hardware acceleration device for performing XPath evaluation against XML documents is the “RAX (Random Access XML) Content Processor” from Tarari, Inc. An example of the use of the device for a content-based routing application is given in the whitepaper “RAX Random Access XML: Fundamentally Changing How XML is Used and Processed”, Tarari Inc., 2004. The white paper describes a classification application used for content routing, and provides benchmark data to illustrate the performance of the RAX hardware acceleration. The benchmark was based on input XML documents with an average size of 8.8 Kbytes. The benchmark only used 63 XPath matching rules, which is orders of magnitude too low for a scalable content routing network, where hundreds of thousands or perhaps one million subscriptions are needed. The benchmark reported a throughput of 2652 messages per second on a Xeon P4 Single CPU running at 2.4 GHz. This represents a throughput of approximately 187 MBits per second. When the benchmark was run on an IBM Pentium symmetric multiprocessor platform, the reported throughput was 5118 messages per second, or approximately 360 Mbits per second. A much more scalable solution is needed.